import { useResponseSuccess } from '~/utils/response';

export default eventHandler(async (event) => {
  const categoryId = getRouterParam(event, 'id');
  const body = await readBody(event);
  const { resourceIds } = body;

  // 模拟添加资源到分类
  return useResponseSuccess({
    message: '添加资源成功',
    data: {
      categoryId,
      resourceIds,
      addedCount: resourceIds.length,
    },
  });
});
